[
Contents ]
The HTML Validator Command Line Processor can be run from a DOS command prompt and will accept arguments passed to it from the command line.
NOTE: Since processing more than one file at a time using command line arguments is inefficient (unless you use the -f command), it is recommended that you use the drag and drop capability or the Batch Wizard to process multiple files. That is, drop the files to process onto the Drag and Drop Window of a running instance of HTML Validator. Use Explorer to select the files to drop, and make sure that HTML Validator is set up to process the dropped files the way that you want (by validating and/or using a tool).
The file to run when using command line arguments is called "cmdlineprocessor.exe". This executable understands command line arguments and will call the validator engine (now in a DLL) to perform the correct job.
Examples of acceptable command lines include:
NOTE: The program options and configuration used to validate a document using a command line are those that are last saved and not necessarily those that are currently active if an instance of HTML Validator is running. This includes validating a document using an HTML Editor that provides integrated support for HTML Validator. If you've made changes to the options or configuration, then make sure that these changes have been saved before calling the validator on a command line.
Exit Codes
When cmdlineprocessor.exe exits (v4.0330 and greater), it returns one of the following values:
- 0 - no errors occurred in the cmdlineprocessor.exe portion of the command; however, it is possible an error occurred later
- 1 - a filename was given on the command line but the file does not exist
- 2 - miscellaneous error
- 3 - a filename is required for the command but none was given
- 4 - a timeout occurred waiting for HTML Validator's message window to become available; message could not be sent
- NOTE: Versions prior to v4.0330 will always return 0.
Special Notes
- If you are executing HTML Validator from a DOS prompt, you must include the path to cmdlineprocessor.exe if the directory that contains cmdlineprocessor.exe is not in the search path, otherwise the system will not be able to find HTML Validator. However, you can type the command in the Start | Run dialog box without a path to the executable (in this case, use htmlval.exe instead of cmdlineprocessor.exe; the system will automatically translate htmlval.exe to the correct executable).
- When HTML Validator is run with command line arguments, HTML Validator performs the operation specified by the command line arguments and then immediately exits (unless otherwise noted above for the specific argument).
- Be sure to include the full path to filename if it is not in the current directory.
- Letters following '-' may be either uppercase or lowercase such as -l or -L.
Opening Files in the Editor
To open a file in the editor, you can call cse50.exe followed by the filename. For example, "cse50.exe filename".
Special Notes
- If you are executing HTML Validator's editor from a DOS prompt, you must include the path to cse50.exe if the directory that contains cse50.exe is not in the search path, otherwise the system will not be able to find the editor. However, you can type the command in the Start | Run dialog box without a path to the executable.
- Be sure to include the full path to filename if it is not in the current directory.
[ Contents ]